package cn.maihe.elg.operation.supports.guarantee.enums;

import java.util.Arrays;

/**
 * @Description 保函验签通道
 * @Author caixh
 * @Date 2021/5/18.
 */
public enum GuaranteeCode {
    inner("inner", "内部查询");

    /**
     * 库表出函机构编码&出函机构入口编码标识
     */
    private String code;
    private String desc;

    GuaranteeCode(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static GuaranteeCode resolve(String code){
        return Arrays.stream(values()).filter(o -> o.getCode().equals(code)).findFirst().orElse(null);
    }
}
